package com.platform.provider.function;

import com.platform.common.bean.User;
import com.platform.common.interfaces.IQueryUserFunction;
import com.platform.provider.service.QueryUserInfoService;
import org.apache.dubbo.config.annotation.Service;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.ws.rs.Path;

@Service(interfaceName = "queryUserFunction")
@Path("/user")
public class QueryUserFunction implements IQueryUserFunction {

    @Autowired
    private QueryUserInfoService queryUserInfoService;

    private static final Logger logger = LoggerFactory.getLogger(QueryUserFunction.class);
    @Override
    @Path("/queryUserById")
    public User queryUserById(int userId){
        logger.info("userId is:"+userId);
        return queryUserInfoService.queryUserInfo(userId);
    }

}
